package observe;

/**
 * @author shenhan
 * @create 2020/4/10 17:44
 * @description
 */
public class Baidu implements Observer {
    private float temperature;
    private float pressure;
    private float humidity;

    @Override
    public void update(float temperature, float pressure, float humidity) {
        this.temperature = temperature;
        this.pressure = pressure;
        this.humidity = humidity;
        display();
    }

    private void display() {
        System.out.println("***Today baidu mPressure: " + pressure + "***");
        System.out.println("***Today baidu mTemperature: " + temperature + "***");
        System.out.println("***Today baidu mHumidity: " + humidity + "***");
    }
}
